#include<stdio.h>
#include<unistd.h>
int main()
{
    pid_t pid = fork();
    printf("Before:pid is %d\n",getpid());
    if(pid == -1 )
    {

        perror("fork( error )");
    }
    printf("After:pid is %d, fork return %d\n",getpid(),pid);
    sleep(1);
    return 0;
}
